import os
#"0"	"id"
#"1"	"imageName"
#"2"	"category"
#"3"	"layer"
#"4"	"snapPosX"
#"5"	"snapPosY"
#"6" "wearing"
#"7" "waldrobe"

items = ID, ImageName, Category, Layer, SnapPosX, SnapPosY, Wearing, Waldrobe \
    = range(8)

#from wget http://www.stortroopers.com/classic_boy/data/articles.php
configdata = """ "1" "boy_body_01.gif" "body" "body" "26" "28" "-1"
"2" "boy_body_02.gif" "body" "body" "26" "28" "-1"
"3" "boy_body_03.gif" "body" "body" "26" "28" "-1"
"4" "boy_body_04.gif" "body" "body" "26" "28" "-1"
"5" "alien.gif" "body" "body" "27" "28" "-1"
"6" "boy_jeans_02.gif" "bottoms" "tops n bottoms" "35" "99" "-1"
"7" "boy_jeans_03.gif" "bottoms" "tops n bottoms" "36" "70" "-1"
"8" "boy_jeans_05.gif" "bottoms" "tops n bottoms" "34" "98" "-1"
"9" "boy_jeans_04.gif" "bottoms" "tops n bottoms" "35" "98" "-1"
"10" "boy_shorts_01.gif" "bottoms" "tops n bottoms" "36" "99" "-1"
"11" "boy_trousers_12.gif" "bottoms" "tops n bottoms" "37" "98" "-1"
"12" "boy_trousers_11.gif" "bottoms" "tops n bottoms" "36" "97" "-1"
"13" "boy_trousers_08.gif" "bottoms" "tops n bottoms" "37" "98" "-1"
"14" "boy_trousers_09.gif" "bottoms" "tops n bottoms" "36" "98" "-1"
"15" "boy_trousers_10.gif" "bottoms" "tops n bottoms" "34" "98" "-1"
"149" "glasses_05.gif" "extras" "infront" "36" "47" "-1"
"148" "glasses_04.gif" "extras" "infront" "36" "47" "-1"
"147" "glasses_03.gif" "extras" "infront" "36" "48" "-1"
"21" "chainsaw.gif" "extras" "infront" "12" "87" "-1"
"22" "boy_hair_27.gif" "hair" "hair" "33" "26" "-1"
"23" "boy_hair_28.gif" "hair" "hair" "34" "26" "-1"
"24" "boy_hair_29.gif" "hair" "hair" "31" "22" "-1"
"25" "boy_hair_30.gif" "hair" "hair" "31" "21" "-1"
"26" "boy_hair_31.gif" "hair" "hair" "31" "21" "-1"
"27" "boy_hair_32.gif" "hair" "hair" "32" "22" "-1"
"28" "boy_hair_33.gif" "hair" "hair" "30" "19" "-1"
"29" "boy_hair_34.gif" "hair" "hair" "30" "19" "-1"
"30" "boy_hair_35.gif" "hair" "hair" "34" "23" "-1"
"31" "boy_hair_36.gif" "hair" "hair" "32" "23" "-1"
"32" "boy_hair_37.gif" "hair" "hair" "28" "20" "-1"
"33" "boy_hair_38.gif" "hair" "hair" "32" "24" "-1"
"34" "boy_hair_39.gif" "hair" "hair" "28" "23" "-1"
"35" "boy_hair_40.gif" "hair" "hair" "28" "23" "-1"
"36" "boy_hair_41.gif" "hair" "hair" "27" "22" "-1"
"37" "boy_coat_05.gif" "tops" "jackets" "22" "65" "-1"
"38" "boy_coat_06.gif" "tops" "jackets" "24" "64" "-1"
"39" "boy_coat_03.gif" "tops" "jackets" "24" "63" "-1"
"40" "boy_coat_04.gif" "tops" "jackets" "24" "63" "-1"
"41" "boy_hat_01.gif" "hats" "hats" "28" "22" "-1"
"42" "boy_hat_02.gif" "hats" "hats" "31" "20" "-1"
"43" "boy_hat_03.gif" "hats" "hats" "28" "18" "-1"
"44" "boy_hat_04.gif" "hats" "hats" "34" "30" "-1"
"45" "boy_undies_09.gif" "pants" "underware" "40" "97" "-1"
"46" "boy_undies_10.gif" "pants" "underware" "40" "96" "-1"
"47" "boy_undies_11.gif" "pants" "underware" "40" "95" "-1"
"48" "boy_undies_12.gif" "pants" "underware" "40" "97" "-1"
"49" "boy_undies_13.gif" "pants" "underware" "40" "96" "-1"
"50" "boy_undies_14.gif" "pants" "underware" "42" "97" "-1"
"51" "boy_undies_15.gif" "pants" "underware" "40" "95" "-1"
"52" "boy_undies_08.gif" "pants" "underware" "41" "95" "-1"
"53" "boy_shoes_01.gif" "shoes" "tops n bottoms" "35" "127" "-1"
"54" "boy_shoes_02.gif" "shoes" "tops n bottoms" "37" "128" "-1"
"55" "boy_shoes_03.gif" "shoes" "tops n bottoms" "35" "128" "-1"
"56" "boy_shoes_04.gif" "shoes" "tops n bottoms" "37" "125" "-1"
"57" "boy_shoes_05.gif" "shoes" "tops n bottoms" "35" "128" "-1"
"58" "boy_shoes_06.gif" "shoes" "tops n bottoms" "35" "128" "-1"
"59" "boy_shoes_07.gif" "shoes" "tops n bottoms" "37" "128" "-1"
"60" "boy_tee_11.gif" "tops" "tops n bottoms" "38" "69" "-1"
"61" "boy_tee_12.gif" "tops" "tops n bottoms" "38" "69" "-1"
"62" "boy_tee_13.gif" "tops" "tops n bottoms" "38" "69" "-1"
"63" "boy_tee_14.gif" "tops" "tops n bottoms" "38" "69" "-1"
"64" "boy_tee_15.gif" "tops" "tops n bottoms" "31" "70" "-1"
"65" "boy_tee_16.gif" "tops" "tops n bottoms" "31" "69" "-1"
"66" "boy_tee_17.gif" "tops" "tops n bottoms" "32" "69" "-1"
"67" "boy_tee_18.gif" "tops" "tops n bottoms" "32" "69" "-1"
"158" "boy_tee_10.gif" "tops" "tops n bottoms" "32" "69" "-1"
"69" "boy_tee_19.gif" "tops" "tops n bottoms" "32" "70" "-1"
"70" "boy_tee_20.gif" "tops" "tops n bottoms" "32" "70" "-1"
"71" "boy_shirt_14.gif" "tops" "tops n bottoms" "25" "66" "-1"
"72" "boy_shirt_13.gif" "tops" "tops n bottoms" "26" "67" "-1"
"73" "boy_shirt_12.gif" "tops" "tops n bottoms" "26" "66" "-1"
"74" "boy_shirt_11.gif" "tops" "tops n bottoms" "25" "67" "-1"
"75" "boy_shirt_10.gif" "tops" "tops n bottoms" "25" "66" "-1"
"76" "boy_shirt_09.gif" "tops" "tops n bottoms" "25" "67" "-1"
"77" "boy_shirt_08.gif" "tops" "tops n bottoms" "26" "66" "-1"
"78" "boy_shirt_07.gif" "tops" "tops n bottoms" "25" "66" "-1"
"79" "boy_jumper_05.gif" "tops" "tops n bottoms" "25" "65" "-1"
"80" "boy_jumper_11.gif" "tops" "tops n bottoms" "26" "68" "-1"
"81" "boy_jumper_10.gif" "tops" "tops n bottoms" "26" "67" "-1"
"82" "boy_jumper_09.gif" "tops" "tops n bottoms" "25" "68" "-1"
"83" "boy_jumper_08.gif" "tops" "tops n bottoms" "25" "68" "-1"
"84" "boy_jumper_07.gif" "tops" "tops n bottoms" "24" "64" "-1"
"85" "boy_jumper_06.gif" "tops" "tops n bottoms" "24" "64" "-1"
"86" "boy_tee_21.gif" "tops" "tops n bottoms" "32" "69" "-1"
"87" "boy_tee_22.gif" "tops" "tops n bottoms" "32" "69" "-1"
"88" "boy_tee_23.gif" "tops" "tops n bottoms" "31" "69" "-1"
"89" "boy_tee_24.gif" "tops" "tops n bottoms" "32" "69" "-1"
"90" "cat_white.gif" "extras" "infront" "7" "108" "-1"
"91" "baby_01.gif" "extras" "infront" "17" "65" "-1"
"92" "baby_02.gif" "extras" "infront" "17" "65" "-1"
"93" "baby_03.gif" "extras" "infront" "17" "65" "-1"
"94" "dog.gif" "extras" "infront" "3" "87" "-1"
"95" "cat_brown.gif" "extras" "infront" "7" "108" "-1"
"101" "boy_hair_02.gif" "hair" "hair" "33" "19" "-1"
"100" "boy_hair_01.gif" "hair" "hair" "31" "18" "-1"
"99" "cat_black.gif" "extras" "infront" "7" "108" "-1"
"102" "boy_hair_03.gif" "hair" "hair" "31" "18" "-1"
"103" "boy_hair_04.gif" "hair" "hair" "34" "23" "-1"
"104" "boy_hair_05.gif" "hair" "hair" "31" "24" "-1"
"105" "boy_hair_06.gif" "hair" "hair" "31" "17" "-1"
"106" "boy_hair_07.gif" "hair" "hair" "31" "23" "-1"
"107" "boy_hair_08.gif" "hair" "hair" "32" "28" "-1"
"108" "boy_hair_09.gif" "hair" "hair" "34" "22" "-1"
"109" "boy_hair_10.gif" "hair" "hair" "31" "22" "-1"
"110" "boy_hair_11.gif" "hair" "hair" "34" "26" "-1"
"111" "boy_hair_12.gif" "hair" "hair" "34" "26" "-1"
"112" "boy_hair_13.gif" "hair" "hair" "35" "27" "-1"
"113" "boy_hair_14.gif" "hair" "hair" "32" "21" "-1"
"114" "boy_hair_15.gif" "hair" "hair" "33" "21" "-1"
"115" "boy_hair_16.gif" "hair" "hair" "29" "20" "-1"
"116" "boy_hair_17.gif" "hair" "hair" "34" "25" "-1"
"117" "boy_hair_18.gif" "hair" "hair" "34" "25" "-1"
"118" "boy_hair_19.gif" "hair" "hair" "32" "18" "-1"
"119" "boy_hair_20.gif" "hair" "hair" "32" "21" "-1"
"120" "boy_hair_21.gif" "hair" "hair" "34" "26" "-1"
"121" "boy_hair_22.gif" "hair" "hair" "29" "21" "-1"
"122" "boy_hair_23.gif" "hair" "hair" "30" "21" "-1"
"123" "boy_hair_24.gif" "hair" "hair" "32" "23" "-1"
"124" "boy_hair_25.gif" "hair" "hair" "34" "26" "-1"
"125" "boy_hair_26.gif" "hair" "hair" "34" "25" "-1"
"126" "boy_facialhair_01.gif" "hair" "hair" "44" "58" "-1"
"127" "boy_facialhair_02.gif" "hair" "hair" "43" "58" "-1"
"128" "boy_facialhair_03.gif" "hair" "hair" "35" "56" "-1"
"129" "boy_facialhair_04.gif" "hair" "hair" "35" "54" "-1"
"130" "boy_facialhair_05.gif" "hair" "hair" "46" "62" "-1"
"131" "boy_facialhair_06.gif" "hair" "hair" "43" "57" "-1"
"132" "boy_facialhair_07.gif" "hair" "hair" "43" "57" "-1"
"146" "glasses_02.gif" "extras" "infront" "34" "47" "-1"
"145" "glasses_01.gif" "extras" "infront" "35" "44" "-1"
"135" "boy_shoes_08.gif" "shoes" "tops n bottoms" "36" "125" "-1"
"136" "boy_shoes_09.gif" "shoes" "tops n bottoms" "36" "125" "-1"
"161" "boy_scarf_01.gif" "extras" "infront" "32" "63" "-1"
"138" "boy_shoes_10.gif" "shoes" "tops n bottoms" "37" "119" "-1"
"139" "boy_shoes_11.gif" "shoes" "tops n bottoms" "37" "97" "-1"
"154" "shades_03.gif" "extras" "infront" "35" "46" "-1"
"153" "shades_02.gif" "extras" "infront" "36" "47" "-1"
"152" "shades_01.gif" "extras" "infront" "34" "46" "-1"
"151" "glasses_06.gif" "extras" "infront" "36" "47" "-1"
"150" "glasses_07.gif" "extras" "infront" "36" "47" "-1"
"155" "shades_04.gif" "extras" "infront" "36" "46" "-1"
"156" "shades_05.gif" "extras" "infront" "33" "46" "-1"
"157" "shades_06.gif" "extras" "infront" "34" "45" "-1"
"159" "boy_kilt_01.gif" "bottoms" "tops n bottoms" "36" "96" "-1"
"160" "boy_kilt_02.gif" "bottoms" "tops n bottoms" "36" "92" "-1"
"162" "boy_scarf_02.gif" "extras" "infront" "32" "63" "-1"
"163" "computer.gif" "extras" "infront" "3" "100" "-1"
"164" "football.gif" "extras" "infront" "15" "116" "-1"
"165" "boy_hair_42.gif" "hair" "hair" "24" "23" "-1"
"166" "boy_hair_43.gif" "hair" "hair" "30" "12" "-1"
"167" "boy_hair_44.gif" "hair" "hair" "24" "9" "-1"
"168" "boy_hat_09.gif" "hats" "hats" "26" "20" "-1"
"169" "boy_hat_10.gif" "hats" "hats" "28" "22" "-1"
"170" "boy_hat_11.gif" "hats" "hats" "33" "26" "-1" """

def getDataSet():
    set = []
    items = configdata.split('\n')
    for item in items:
        item = item.split(' ')
        set.append(map(lambda s:s.strip('"'), item))
    return set
    
    
def wget (fname):
    os.spawnlp(os.P_WAIT, '/sw/bin/wget', 'wget', fname)
    
path=r'http://www.stortroopers.com/fashion_boy/data/images/articles/'
elements = getDataSet()
for e in elements:
    print e[ImageName]
    wget(path + e[ImageName])

